Many portable devices such as smartphones and tablets have a location provider that provides information indicating the current location of the device. These location providers may use a variety of techniques for determining the location of the device. These techniques include Bluetooth, Wi-Fi, cellular, and satellite techniques. The techniques may use proximity information such as the location of a single device (e.g., cell tower) or may use triangulation based on the location of multiple devices. Bluetooth techniques use nearby devices to determine the location of the device. Wi-Fi techniques use available wireless access points such as those that comply with the IEEE 802.11 standard to determine the location of the device. Cellular techniques use nearby cellular towers to determine the location of the device. Satellite techniques use a satellite navigation system to triangulate the location of the device. Satellite navigation systems include the Global Positioning System (“GPS”) operated by the United States government and the Global Navigation Satellite System (“GLONASS”) operated by the Russian government. Satellite techniques typically provide the most accurate location information (also referred to as fine-grained location information) but consume a relatively high amount of power when doing so (e.g., high-power techniques). Wi-Fi and cellular techniques use a relatively low amount of power (low-power techniques) but typically provide less accurate location information (also referred to as coarse-grained location information) than satellite techniques. Bluetooth techniques are both very accurate and low-power, but their range (e.g., theoretically up to 100 meters) is very short.
The location providers of these portable devices are typically provided by the underlying operating system (e.g., Windows, Android, and iOS). Applications executing on the portable devices interface with the application programming interface (“API”) of the location provider to track the location of the device. The location providers typically provide a range of location services. These location services may include a significant-change location service, a region-monitoring location service, and a standard location service. When a location provider provides to an application a notification of a change in the location of the device, it reports a location and an accuracy. The reported location may be specified using longitude and latitude. The reported accuracy is a distance from the reported location that, with a high degree of confidence (e.g., 0.95), the device is within. If the application is asleep when the location provider detects a change in location, the operating system may wake that application so that the application can process the notification of the change.
A significant-change location service typically provides notification to an application when the location of the device has changed significantly. The significant-change location service may define what amount of change in distance corresponds to a “significant” change based on various factors such as the speed of the device (i.e., how fast the device is moving). A significant-change location service may consume a relatively small amount of power by using Wi-Fi or cellular techniques to the extent possible. For example, an application that displays information on nearby restaurants may only need to update the information based on significant changes in location of the device. Such an application would register to receive notifications of significant changes in location and then update the nearby restaurant information in response to notifications from the significant-change location service.
A region-monitoring location service typically provides notification to an application when the location of the device has crossed a boundary of a region (i.e., entering or exiting the region). Such a region is also known as a geo-fence. The region-monitoring location service allows an application to define regions for monitoring by specifying, for example, a location and a radius around that location. After the application registers the regions with the region-monitoring location service, the region-monitoring location service tracks the location of the device, typically using a low-power technique. When the region-monitoring location service detects that the device has crossed a boundary of a defined region, the region-monitoring location service notifies the application of that crossing. For example, an application may define a region around each location of a coffee shop so that the application can be notified when a user of the device is near a coffee shop and then alert the user that the coffee shop is nearby.
A standard location service typically provides notification to an application when the location of the device has moved by more than a certain distance based on a desired accuracy of the location. The standard location service allows an application to define the desired accuracy and distance. The accuracy indicates just how precise of a location is desired. The distance indicates that the application desires to receive notifications whenever the device moves by that distance. For example, an application that provides real-time directions for driving may desire an accuracy of within 20 meters and a distance of 10 meters. In contrast, an application that provides information on nearby restaurants may desire an accuracy of 1,000 meters and a distance of 2,000 meters.
To balance the need for accuracy in location information with the need to conserve power in a device (e.g., battery power in a smartphone), an application can select the location service that is likely to be the best at achieving its desired balance. Although the selected location service may be the best of the location service provided by the device at achieving the desired balance, the underlying operating system typically does not guarantee that the selected location service will achieve the desired balance and the balance that is actually achieved may be very different from the desired balance.